home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / java / awt / Canvas.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  2.1 KB  |  69 lines

  1. package java.awt;
  2.  
  3. import java.awt.image.BufferStrategy;
  4. import javax.accessibility.Accessible;
  5. import javax.accessibility.AccessibleContext;
  6.  
  7. public class Canvas extends Component implements Accessible {
  8.    private static final String base = "canvas";
  9.    private static int nameCounter = 0;
  10.    private static final long serialVersionUID = -2284879212465893870L;
  11.  
  12.    public Canvas() {
  13.    }
  14.  
  15.    public Canvas(GraphicsConfiguration var1) {
  16.       this();
  17.       this.graphicsConfig = var1;
  18.    }
  19.  
  20.    String constructComponentName() {
  21.       synchronized(this.getClass()) {
  22.          return "canvas" + nameCounter++;
  23.       }
  24.    }
  25.  
  26.    public void addNotify() {
  27.       synchronized(this.getTreeLock()) {
  28.          if (this.peer == null) {
  29.             this.peer = this.getToolkit().createCanvas(this);
  30.          }
  31.  
  32.          super.addNotify();
  33.       }
  34.    }
  35.  
  36.    public void paint(Graphics var1) {
  37.       var1.clearRect(0, 0, this.width, this.height);
  38.    }
  39.  
  40.    public void update(Graphics var1) {
  41.       var1.clearRect(0, 0, this.width, this.height);
  42.       this.paint(var1);
  43.    }
  44.  
  45.    boolean postsOldMouseEvents() {
  46.       return true;
  47.    }
  48.  
  49.    public void createBufferStrategy(int var1) {
  50.       super.createBufferStrategy(var1);
  51.    }
  52.  
  53.    public void createBufferStrategy(int var1, BufferCapabilities var2) throws AWTException {
  54.       super.createBufferStrategy(var1, var2);
  55.    }
  56.  
  57.    public BufferStrategy getBufferStrategy() {
  58.       return super.getBufferStrategy();
  59.    }
  60.  
  61.    public AccessibleContext getAccessibleContext() {
  62.       if (this.accessibleContext == null) {
  63.          this.accessibleContext = new AccessibleAWTCanvas(this);
  64.       }
  65.  
  66.       return this.accessibleContext;
  67.    }
  68. }
  69.